//
//  YYJLExchangeController.m
//  YuanyangJinlou
//
//  Created by mac004 on 2017/1/12.
//  Copyright © 2017年 suli19910309@qq.com. All rights reserved.
//  我的兑换

#import "YYJLExchangeController.h"
#import "YYJLExchangeCell.h"
@interface YYJLExchangeController ()<UITableViewDataSource,UITableViewDelegate>{
    UITableView*_tableview;
}

@end

@implementation YYJLExchangeController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setTitleView:@"我的兑换"];
    [self setBackItem];
    [self creatUI];
    
}
-(void)creatUI{
    _tableview=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) style:UITableViewStylePlain];
    _tableview.dataSource=self;
    _tableview.delegate=self;
    _tableview.separatorStyle=UITableViewCellSeparatorStyleNone;
    _tableview.backgroundColor=[UIColor clearColor];
   // [self.view addSubview:_tableview];
    [self NoExchange];
    
}

#pragma mark -暂无兑换记录
-(void)NoExchange{
    UIImageView * imgView=[[UIImageView alloc]initWithFrame:CGRectMake(126.5*PER_WIDTH, 140*PER_HEIGHT, 122*PER_WIDTH, 125*PER_WIDTH)];
    imgView.image=[UIImage imageNamed:@"img_wuduihuan"];
    [self.view addSubview:imgView];
    
    UILabel * lab=[MyControl createLabelWithFrame:CGRectMake(0, imgView.bottom+15*PER_HEIGHT, SCREEN_WIDTH, 15*PER_HEIGHT) Font:15 Text:@"暂无兑换记录,赶紧去逛积分商城吧!" Color:FEELT_COLOR];
    lab.textAlignment=NSTextAlignmentCenter;
    [self.view addSubview:lab];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 4;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    YYJLExchangeCell*cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell=[[YYJLExchangeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }
    cell.selectionStyle=UITableViewCellSelectionStyleNone;
    cell.backgroundColor=[UIColor clearColor];
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 185*PER_HEIGHT;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
